package com.bignerdranch.android.ecar.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.RelativeLayout;

import com.bignerdranch.android.ecar.R;

public class SettingActivity extends BaseActivity implements View.OnClickListener {

    private ImageButton setting_back;
    private RelativeLayout part_1;
    private RelativeLayout part_2;
    private RelativeLayout part_3;
    private RelativeLayout part_4;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        initView();
    }

    private void initView() {
        setting_back = (ImageButton) findViewById(R.id.setting_back);
        part_1 = (RelativeLayout) findViewById(R.id.part_1);
        part_1.setOnClickListener(this);
        part_2 = (RelativeLayout) findViewById(R.id.part_2);
        part_2.setOnClickListener(this);
        part_3 = (RelativeLayout) findViewById(R.id.part_3);
        part_3.setOnClickListener(this);
        part_4 = (RelativeLayout) findViewById(R.id.part_4);
        part_4.setOnClickListener(this);

        setting_back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.setting_back:
                finish();
                break;
            case R.id.part_1:
                Intent intent1 = new Intent(this,FeedbackActivity.class);
                startActivity(intent1);
                break;
            case R.id.part_2:
                Intent intent = new Intent(this,AboutActivity.class);
                startActivity(intent);
                break;
            case R.id.part_3:

                break;
            case R.id.part_4:

                break;
        }
    }
}
